<?php
/**
 * Created by PhpStorm.
 * User: nathan
 * Date: 2019/2/13
 * Time: 11:29
 */

namespace Refine;


use Pimple\Container;

/**
 * Class Application
 * @package Refine
 */
class Application
{
    /**
     * @var Container $container
     */
    protected $container;

    /**
     * Application constructor.
     * @param array $config
     */
    public function __construct(array $config)
    {
        $this->container = new Container($config);
    }

    public function __get($name)
    {
        $service = $this->container[$name . '.service'];
        if (isset($service)) {
            return $service;
        }
    }

}